#
# use strip if release
#

.PHONY: clean

RM = del
CC = gcc
#CC = clang
EXT = .exe

PROJECT = server
OUT = ../bin

IPATH = -I ../../lib/glibc/include/glib-2.0 -I ../../lib/glibc/lib/glib-2.0/include
LPATH = -L ../../lib/glibc/lib
CFLAGS = -DSHOW_LOG -g -Wall  $(IPATH)
LFLAGS = -lws2_32 -lglib-2.0.dll $(LPATH)

OBJS = main.o server.o log.o

$(OUT)/$(PROJECT)$(EXT): $(OBJS) common.h.gch
	$(CC) -o $@ $(OBJS) $(LFLAGS)
#	strip $@

common.h.gch: common.h log.h
	$(CC) $< $(CFLAGS)

server.o: server.h server.c common.h
main.o: main.c server.h common.h
log.o: log.h log.c


clean:
	$(RM) *.exe *.o

